package com.zbs.simbot.data;

import java.io.File;

/**
 * @author Zbs
 * @date 2023/9/28 17:50
 */
public class FilePathUtil {
    // 数据路径
    private static final String dataPath = System.getProperty("user.dir") + File.separator + "data";



    public static String getUserDataPath(Long userId) {
        return dataPath + File.separator + userId;
    }

    public static String getUidFilePath(Long userId) {
        // uid 保存路径
        String name = "uid";
        // cookies 保存路径
        return getUserDataPath(userId) + File.separator + name + File.separator + userId + "_" + name + ".json";
    }

    public static String getCookieFilePath(Long userId) {
        String name = "cookies";
        // cookies 保存路径
        return getUserDataPath(userId) + File.separator + name + File.separator + userId + "_" + name + ".json";
    }

    public static String getActivateCookieGameRoleFilePath(Long userId) {
        String name = "activate";
        // activate 保存路径
        return getUserDataPath(userId) + File.separator + name + File.separator + userId + "_" + name + ".json";
    }

    public static String getGameRoleFilePath(Long userId) {
        String name = "role";
        // activate 保存路径
        return getUserDataPath(userId) + File.separator + name + File.separator + userId + "_" + name + ".json";
    }
}
